home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 117 / PC Guia 117.iso / Software / Produtividade / Software3 / Product4 / Data1.cab / _8CA8D6E796D941EDBF331582D3B64526 < prev    next >
Encoding:
Text File  |  2004-10-19  |  39.2 KB  |  1,404 lines

  1. <HTML>
  2.  
  3. <head>
  4. <SCRIPT LANGUAGE="JavaScript">
  5. <!--
  6.  
  7. // ...........................................................................
  8. var virtualTab = "             ";
  9. var miniTab = "        "; 
  10. var the_text = "";
  11. var logArr = new Array(1000);
  12. var logNdx = 0;
  13.  
  14. function addToLog(t)
  15.     logArr[logNdx++] = t + "<br>";
  16.     document.all.log.value = t;
  17.  
  18.     //the_text += "~" + t + "\n";    //"\n";
  19.     //document.all.log.value = the_text;
  20. }
  21. function announceFinish(t)
  22. {
  23.     var asterisks = "********";
  24.     var msg = asterisks + " Test completed OK: " + t + " " + asterisks;
  25.     addToLog(msg);
  26. }
  27. function announceFinishBad(t,cnt)
  28. {
  29.     var asterisks = "********";
  30.     var msg = asterisks + " Test completed with " + cnt + " ERRORS: " + t + " " + asterisks;
  31.     addToLog(msg);
  32. }
  33. function announceCompletedSubsection()
  34. {
  35.     var dashes = "-------";
  36.     var msg = miniTab + dashes + " Section completed OK " + dashes;
  37.     addToLog(msg);
  38. }
  39. function announceStart(t)
  40. {
  41.     var asterisks = "********";
  42.     var msg = asterisks + " Starting test: " + t + " " + asterisks;
  43.     addToLog(msg);
  44. }
  45. function error(t)
  46. {
  47.     var asterisks = "********";
  48.     var msg = asterisks + " ERROR: " + t + " " + asterisks;
  49.     addToLog(msg);
  50. }
  51. function item(nmbr_tabs, t)
  52. {
  53.     var msg = "";
  54.  
  55.     while( nmbr_tabs-- ) {
  56.         msg += virtualTab;
  57.     }
  58.     msg += t;
  59.  
  60.     addToLog(msg);
  61. }
  62. function milestone(t)
  63. {
  64.     var dashes = "-------";
  65.     var msg = miniTab + dashes + " section: " + t + " " + dashes;
  66.     addToLog(msg);
  67. }
  68. function redMsg(t)
  69. {
  70.     var asterisks = "********";
  71.     var msg = asterisks + " NOTE: " + t + " " + asterisks;
  72.     addToLog(msg);
  73. }
  74. // ...........................................................................
  75. // ...........................................................................
  76. // ...........................................................................
  77. // ...........................................................................
  78. // ...........................................................................
  79. // ...........................................................................
  80. // ...........................................................................
  81.  
  82. var RATE_fast = 50;
  83. var RATE_slow = 500;
  84. var rate = RATE_slow;
  85. var glob_tempArr;
  86. var glob_bool_step_ALL = 0;
  87. var glob_bool_enchilada = 0;
  88. var glob_searchword_ndx;
  89. var glob_searchword_errors;
  90.  
  91. var tbl_nav_pages = new Array(
  92. "0_0_0_0.html",
  93. "0_0_0_0.html",
  94. "1_0_0_0.html",
  95. "2_0_0_0.html",
  96. "0_0_0_0.html",
  97. "search.html",    
  98. "search.html"    
  99. );
  100. var tbl_test_names = new Array(
  101. "ALL - the whole enchilada",
  102. "Page Stepper - Using Help",
  103. "Page Stepper - Contents",
  104. "Page Stepper - Index",
  105. "Page Stepper - All",
  106. "Search Test - Search Words",
  107. "Search Test - Stop Words"
  108. );
  109. var T_ALL_ALL = 0;
  110. var T_STP_UH = 1;
  111. var T_STP_CO = 2;
  112. var T_STP_NX = 3;
  113. var T_STP_ALL = 4;
  114. var T_SEA_WORD = 5;
  115. var T_SEA_STOP = 6;
  116.  
  117. var tbl_test_functions = new Array(
  118. all_all,
  119. stp_uh,
  120. stp_co,
  121. stp_nx,
  122. stp_all,
  123. sea_words,    
  124. sea_stop
  125. );
  126.  
  127. var TEST_current = 1;
  128.  
  129. var links_to_process;
  130. var links_to_process_ndx;
  131.  
  132. var links_to_process_NAV;
  133. var links_to_process_NAV_ndx;
  134. var links_to_process_CH;
  135. var links_to_process_CH_ndx;
  136. var links_to_process_LVL1;
  137. var links_to_process_LVL1_ndx;
  138. var the_timer;
  139.  
  140. var scroll_direction_down = 1;    
  141.  
  142. var glob_pause = 0;
  143. var glob_nextScrollString = "";
  144. var glob_nextScrollTime = 0;
  145. var glob_upTechnique = 0;    // 0 = scroll, 1 = 'top' link
  146. var glob_nextFunction = "";
  147. var glob_mostRecentNavLink;
  148. //------------------------------------------------------------------
  149. function announceLinkClick(s)
  150. {
  151.     s = "" + s;
  152.     item(1,"Clicking link: " + s );
  153. }
  154. //------------------------------------------------------------------
  155. function announceMilestone(m)
  156. {
  157.     milestone(m);
  158. }
  159. //------------------------------------------------------------------
  160. function announceTest(is_end)
  161. {
  162.     var msg = tbl_test_names[TEST_current];
  163.  
  164.     if( ! is_end ) {
  165.         announceStart(msg);
  166.     }
  167.     else if( is_end == 1 ) {
  168.         announceFinish(msg);
  169.     }
  170.     else {
  171.         is_end *= -1;
  172.         announceFinishBad(msg, is_end);
  173.     }
  174. }
  175. //------------------------------------------------------------------
  176. function buttonSaysPause()
  177. {
  178.     if( top.frames[2].document.forms[0].pause.value.indexOf("pause") != -1 ) {
  179.         return true;
  180.     }
  181.     return false;
  182. }
  183. //------------------------------------------------------------------
  184. function buttonSaysStart()
  185. {
  186.     if( top.frames[2].document.forms[0].start.value.indexOf("start") != -1 ) {
  187.         return true;
  188.     }
  189.     return false;
  190. }
  191. //------------------------------------------------------------------
  192. function clickContentLink(lvl)
  193. {
  194.     if( lvl == "CH" ) {
  195.         announceLinkClick(top.frames[1].document.links[links_to_process_CH[links_to_process_CH_ndx]].href);
  196.         top.frames[1].document.links[links_to_process_CH[links_to_process_CH_ndx++]].click();
  197.     }
  198.     else {
  199.         announceLinkClick(top.frames[1].document.links[links_to_process_LVL1[links_to_process_LVL1_ndx]].href);
  200.         top.frames[1].document.links[links_to_process_LVL1[links_to_process_LVL1_ndx++]].click();
  201.     }
  202. }
  203. //------------------------------------------------------------------
  204. function clickNavLink()
  205. {
  206.     announceLinkClick(top.frames[0].document.links[links_to_process_NAV[links_to_process_NAV_ndx]].href);
  207.     glob_mostRecentNavLink = top.frames[0].document.links[links_to_process_NAV[links_to_process_NAV_ndx]];
  208.     top.frames[0].document.links[links_to_process_NAV[links_to_process_NAV_ndx++]].click();
  209. }
  210. //------------------------------------------------------------------
  211. function clickNextLink()
  212. {
  213.     if( top.frames[1].document.links[0].innerHTML.indexOf(top.NM_next) != -1 ) {
  214.             announceLinkClick(top.frames[1].document.links[0]);
  215.             top.frames[1].document.links[0].click();
  216.             return true;
  217.     }
  218.     else if( top.frames[1].document.links[1].innerHTML.indexOf(top.NM_next) != -1 ) {
  219.             announceLinkClick(top.frames[1].document.links[1]);
  220.             top.frames[1].document.links[1].click();
  221.             return true;
  222.     }
  223.     else {
  224.         return false;
  225.     }
  226. }
  227. //------------------------------------------------------------------
  228. function clickOnLinkThatMatches(node)
  229. {
  230.     for( var ndx=0; ndx < top.frames[0].document.links.length; ndx++ ) {
  231.         if( getLastNodeOf( "" + top.frames[0].document.links[ndx] ) == node ) {
  232.             announceLinkClick(top.frames[0].document.links[ndx].innerHTML);
  233.             top.frames[0].document.links[ndx].click();
  234.             return 1;
  235.         }
  236.     }
  237.     return 0;
  238. }
  239. //------------------------------------------------------------------
  240. function clickPrevLink()
  241. {
  242.     if( top.frames[1].document.links[0].innerHTML.indexOf(top.NM_previous) != -1 ) {
  243.             announceLinkClick(top.frames[1].document.links[0]);
  244.             top.frames[1].document.links[0].click();
  245.             return true;
  246.     }
  247.     else if( top.frames[1].document.links[1].innerHTML.indexOf(top.NM_previous) != -1 ) {
  248.             announceLinkClick(top.frames[1].document.links[1]);
  249.             top.frames[1].document.links[1].click();
  250.             return true;
  251.     }
  252.     else {
  253.         return false;
  254.     }
  255. }
  256. //------------------------------------------------------------------
  257. function clickTheTopLink()
  258. {
  259.     if( top.frames[1].document.links[top.frames[1].document.links.length-1].innerHTML.indexOf(top.NM_top) != -1 ) {
  260.         top.frames[1].document.links[top.frames[1].document.links.length-1].click();
  261.     }
  262. }
  263. //------------------------------------------------------------------
  264. function disableEraseButton()
  265. {
  266.     top.frames[2].document.forms[0].eraseLog.disabled = true;
  267. }
  268. //------------------------------------------------------------------
  269. function disableWindowizeLogButton()
  270. {
  271.     top.frames[2].document.forms[0].windowizeLog.disabled = true;
  272. }
  273. //------------------------------------------------------------------
  274. function disablePauseButton()
  275. {
  276.     top.frames[2].document.forms[0].pause.disabled = true;
  277. }
  278. //------------------------------------------------------------------
  279. function disableStartButton()
  280. {
  281.     top.frames[2].document.forms[0].start.disabled = true;
  282. }
  283. //------------------------------------------------------------------
  284. function enableEraseButton()
  285. {
  286.     top.frames[2].document.forms[0].eraseLog.disabled = false;
  287. }
  288. //------------------------------------------------------------------
  289. function enableWindowizeLogButton()
  290. {
  291.     top.frames[2].document.forms[0].windowizeLog.disabled = false;
  292. }
  293. //------------------------------------------------------------------
  294. function enablePauseButton()
  295. {
  296.     top.frames[2].document.forms[0].pause.disabled = false;
  297. }
  298. //------------------------------------------------------------------
  299. function enableStartButton()
  300. {
  301.     top.frames[2].document.forms[0].start.disabled = false;
  302. }
  303. //------------------------------------------------------------------
  304. function endTest(msg,showAlert)
  305. {
  306.     clearTimeout(the_timer);
  307.     if( ! showAlert ) { return; }
  308.     makeButtonSayPause();
  309.     disablePauseButton();
  310.     makeButtonSayStart();
  311.     enableStartButton();
  312.     enableEraseButton();
  313.     enableWindowizeLogButton();
  314.     scrollPupEnable();
  315.     testSelPupEnable();
  316.     alert(msg);
  317. }
  318. //------------------------------------------------------------------
  319. function eraseTheLog()
  320. {
  321.     if( confirm("Do you really want to erase the entire log?") ) {
  322.         document.all.log.value = "";
  323.         logArr = new Array(1000);
  324.         //the_text = "";
  325.     }
  326. }
  327. //------------------------------------------------------------------
  328. function gatherListOfLevel_1_Links()    // links that reside within chapters but link to L1 items
  329. {
  330.     var here = getLastNodeOf( "" + top.frames[1].document.location );
  331.     var beginning = getBeginningOf(here,2);
  332.  
  333.     glob_tempArr = new Array();
  334.  
  335.     links_to_process_CH = new Array();
  336.     links_to_process_CH_ndx = 0;
  337.  
  338.     for( var ndx=1; ndx < top.frames[1].document.links.length; ndx++ ) {
  339.         var lnk = "" + top.frames[1].document.links[ndx];
  340.         var normalized = getLastNodeOf( lnk );
  341.  
  342.         if( (normalized.indexOf("0.html") != 0) && 
  343.             (normalized.indexOf(beginning) == 0) && 
  344.             (normalized.indexOf("top") == -1)
  345.           ) {
  346.             // We have a candidate link. Make sure that it already isn't in the list of links to process
  347.             if( ! inArray(normalized) ) {
  348.                 glob_tempArr[glob_tempArr.length] = normalized;
  349.                 links_to_process_CH[links_to_process_CH.length] = ndx;
  350.             }
  351.         }
  352.     }
  353.     return links_to_process_CH.length;
  354. }
  355. //------------------------------------------------------------------
  356. function gatherListOfLevel_2_Links()
  357. {
  358.     var here = getLastNodeOf( "" + top.frames[1].document.location );
  359.     var beginning = getBeginningOf(here,3);
  360.  
  361.     glob_tempArr = new Array();
  362.  
  363.     links_to_process_LVL1 = new Array();
  364.     links_to_process_LVL1_ndx = 0;
  365.  
  366.     for( var ndx=1; ndx < top.frames[1].document.links.length; ndx++ ) {
  367.         var lnk = "" + top.frames[1].document.links[ndx];
  368.         var normalized = getLastNodeOf( lnk );
  369.  
  370.         if( (normalized.indexOf("0.html") == -1) && 
  371.             (normalized.indexOf(beginning) == 0) && 
  372.             (normalized.indexOf("top") == -1)
  373.           ) {
  374.             // We have a candidate link. Make sure that it already isn't in the list of links to process
  375.             if( ! inArray(normalized) ) {
  376.                 glob_tempArr[glob_tempArr.length] = normalized;
  377.                 links_to_process_LVL1[links_to_process_LVL1.length] = ndx;
  378.             }
  379.         }
  380.     }
  381.     return links_to_process_LVL1.length;
  382. }
  383. //------------------------------------------------------------------
  384. function gatherListOfNavLinks(s)
  385. {
  386.     var ptn = "/" + s + "_";
  387.  
  388.     links_to_process_NAV = new Array();
  389.     links_to_process_NAV_ndx = 0;
  390.     for( var ndx=0; ndx < top.frames[0].document.links.length; ndx++ ) {
  391.         var lnk = "" + top.frames[0].document.links[ndx];
  392.         if( lnk.lastIndexOf(ptn) != -1 ) {
  393.             links_to_process_NAV[links_to_process_NAV.length] = ndx;
  394.         }
  395.     }
  396. }
  397. //------------------------------------------------------------------
  398. function getAndSetStopword4Search()
  399. {
  400.     var current_sw = top.stopwords[glob_searchword_ndx++];
  401.  
  402.     top.srch_input_verbatim = current_sw;
  403.     searchTerm = current_sw;
  404.     top.srch_input_massaged = current_sw;
  405.     
  406.     return current_sw;
  407. }
  408. //------------------------------------------------------------------
  409. function getBeginningOf( u, lmt )
  410. {
  411.     var retStr = "";
  412.     var underscoreCnt = 0;
  413.  
  414.     for( var ndx = 0; ndx < u.length; ndx++ ) {
  415.         if( u.charAt(ndx) == '_' ) {
  416.             retStr += u.charAt(ndx);
  417.             underscoreCnt++;
  418.             if( underscoreCnt == lmt ) {
  419.                 return retStr;
  420.             }
  421.         }
  422.         else {
  423.             retStr += u.charAt(ndx);
  424.         }
  425.     }
  426.     return retStr;
  427. }
  428. //------------------------------------------------------------------
  429. function getLastNodeOf( u )
  430. {
  431.     var pos = u.lastIndexOf("/");
  432.  
  433.     if( pos == -1 ) { return u; }
  434.     
  435.     pos++;
  436.     return u.substring(pos);
  437. }
  438. //------------------------------------------------------------------
  439. function getNextNxNode( n )
  440. {
  441.     var nextNum;
  442.     var myArr = new Array();
  443.  
  444.     myArr = n.split("_");
  445.     nextNum = parseInt(myArr[1]) + 1;
  446.     myArr[1] = nextNum;
  447.     return "" + myArr[0] + "_" + myArr[1] + "_" + myArr[2] + "_" + myArr[3];
  448. }
  449. //------------------------------------------------------------------
  450. function inArray(v)
  451. {
  452.     for( var ndx=0; ndx < glob_tempArr.length; ndx++ ) {
  453.         if( glob_tempArr[ndx] == v ) {
  454.             return true;
  455.         }
  456.     }
  457.     return false;
  458. }
  459. //------------------------------------------------------------------
  460. function leftPaneIs(u)
  461. {
  462.     var leftPaneURL = getLastNodeOf(top.frames[0].document.location);
  463.  
  464.     return (u == leftPaneURL);
  465. }
  466. //------------------------------------------------------------------
  467. function makeButtonSayPause()
  468. {
  469.     top.frames[2].document.forms[0].pause.value = "pause";
  470. }
  471. //------------------------------------------------------------------
  472. function makeButtonSayResume()
  473. {
  474.     top.frames[2].document.forms[0].pause.value = "resume";
  475. }
  476. //------------------------------------------------------------------
  477. function makeButtonSayStart()
  478. {
  479.     top.frames[2].document.forms[0].start.value = "start";
  480. }
  481. //------------------------------------------------------------------
  482. function makeButtonSayStop()
  483. {
  484.     top.frames[2].document.forms[0].start.value = "stop";
  485. }
  486. //------------------------------------------------------------------
  487. function pauseResumeTest()
  488. {
  489.     if( glob_pause ) {    // do resume
  490.         makeButtonSayPause();
  491.         glob_pause = 0;
  492.         enableStartButton();
  493.         disableEraseButton();
  494.         disableWindowizeLogButton();
  495.         scrollPupDisable();
  496.     }
  497.     else {                // do pause
  498.         makeButtonSayResume();
  499.         glob_pause = 1;
  500.         disableStartButton();
  501.         enableEraseButton();
  502.         enableWindowizeLogButton();
  503.         scrollPupEnable();
  504.     }
  505. }
  506. //------------------------------------------------------------------
  507. function proceedToNextFunction(f)
  508. {
  509.     clearTimeout(the_timer);
  510.     the_timer = setTimeout(f, rate);
  511. }
  512. //------------------------------------------------------------------
  513. function proceedToNextFunctionLong(f)
  514. {
  515.     clearTimeout(the_timer);
  516.     the_timer = setTimeout(f, rate*3);
  517. }
  518. //------------------------------------------------------------------
  519. function rpt(next,color1,color2)
  520. {
  521.     var paramStr = "rpt(" + next + "," + color1 + "," + color2 + ")";
  522.  
  523.     if( glob_pause ) { setTimeout(paramStr, 1000); return; }
  524.  
  525.     if( color1 ) {
  526.         item(2,"Content pane URL: " + top.frames[1].document.location);
  527.     }
  528.     else {
  529.         item(2,"Content pane URL: " + top.frames[1].document.location);
  530.     }
  531.  
  532.     if( color2 ) {
  533.         item(2,"Content pane TITLE: " + top.frames[1].document.title);
  534.     }
  535.     else {
  536.         item(2,"Content pane TITLE: " + top.frames[1].document.title);
  537.     }
  538.  
  539.     // Prepare for the next phase
  540.         the_timer = setTimeout(next, rate);
  541. }
  542. //------------------------------------------------------------------
  543. function rptLeft(next,color1,color2)
  544. {
  545.     var paramStr = "rpt(" + next + "," + color1 + "," + color2 + ")";
  546.  
  547.     if( glob_pause ) { setTimeout(paramStr, 1000); return; }
  548.  
  549.     if( color1 >= 0 ) {
  550.         if( color1 ) {
  551.             item(2,"Nav pane URL: " + top.frames[0].document.location);
  552.         }
  553.         else {
  554.             item(2,"Nav pane URL: " + top.frames[0].document.location);
  555.         }
  556.     }
  557.  
  558.     if( color2 >= 0 ) {
  559.         if( color2 ) {
  560.             item(2,"Nav pane TITLE: " + top.frames[0].document.title);
  561.         }
  562.         else {
  563.             item(2,"Nav pane TITLE: " + top.frames[0].document.title);
  564.         }
  565.     }
  566.  
  567.     // Prepare for the next phase
  568.         if( next.length ) {
  569.             the_timer = setTimeout(next, rate);
  570.         }
  571. }
  572. //------------------------------------------------------------------
  573. function scrollPupDisable()
  574. {
  575.     top.frames[2].document.forms[0].whichScroll.disabled = true;
  576. }
  577. //------------------------------------------------------------------
  578. function scrollPupEnable()
  579. {
  580.     top.frames[2].document.forms[0].whichScroll.disabled = false;
  581. }
  582. //------------------------------------------------------------------
  583. function testSelPupDisable()
  584. {
  585.     top.frames[2].document.forms[0].whichTest.disabled = true;
  586. }
  587. //------------------------------------------------------------------
  588. function testSelPupEnable()
  589. {
  590.     top.frames[2].document.forms[0].whichTest.disabled = false;
  591. }
  592. //------------------------------------------------------------------
  593. function setNavFrame()
  594. {
  595.     top.frames[0].document.location = tbl_nav_pages[TEST_current];
  596. }
  597. //------------------------------------------------------------------
  598. function startStopTest()
  599. {
  600.     if( buttonSaysStart() ) {    // START the test
  601.         makeButtonSayStop();
  602.         makeButtonSayPause();
  603.         enablePauseButton();
  604.         disableEraseButton();
  605.         disableWindowizeLogButton();
  606.         setNavFrame();            // Just in case the user did a back, etc. on the NAV frame
  607.         scrollPupDisable();
  608.         testSelPupDisable();
  609.         the_timer = setTimeout("tbl_test_functions[TEST_current]()", rate);    // <<<<<<<<<<<<<<<< PERFORM TEST
  610.     }
  611.     else {                        // STOP the test
  612.         makeButtonSayStart();
  613.         redMsg("Test Aborted");
  614.         endTest("Test Aborted",1);
  615.         makeButtonSayPause();
  616.         disablePauseButton();
  617.         enableEraseButton();
  618.         enableWindowizeLogButton();
  619.         scrollPupEnable(); 
  620.         testSelPupEnable();
  621.         clearTimeout(the_timer);
  622.         glob_bool_step_ALL = 0;
  623.         glob_bool_enchilada = 0;
  624.     }
  625.     glob_upTechnique = 0;
  626. }
  627. //------------------------------------------------------------------
  628. function stepThroughTheLinks()
  629. {
  630.     if( glob_pause ) { setTimeout("stepThroughTheLinks()", 1000); return; }
  631.  
  632.     if( links_to_process_NAV_ndx < links_to_process_NAV.length ) {
  633.         clickNavLink();
  634.  
  635.         windowScroll("rpt('stepThroughTheLinks()',0,1)",rate,1);
  636.     }
  637.     else {
  638.         proceedToNextFunction(glob_nextFunction+"()");
  639.     }
  640. }
  641. //------------------------------------------------------------------
  642. function testChange(which)
  643. {
  644.     if( which != TEST_current ) { 
  645.         TEST_current = which;
  646.  
  647.         setNavFrame();
  648.     }
  649. }
  650. //------------------------------------------------------------------
  651. function scrollChange(which)
  652. {
  653.     if( ! which ) {
  654.         rate = RATE_fast;
  655.     }
  656.     else {
  657.         rate = RATE_slow;
  658.     }
  659. }
  660. //------------------------------------------------------------------
  661. function handleSpaces(s)
  662. {
  663.     var str = "";
  664.     var ndx;
  665.  
  666.     for( ndx = 0; ndx < s.length; ndx++ ) {
  667.         var ch = s.substring(ndx,ndx+1);
  668.         if( ch == " " ) {
  669.             str += " ";
  670.         }
  671.         else {
  672.             str += ch;
  673.         }
  674.     }
  675.  
  676.     return str;
  677. }
  678. //------------------------------------------------------------------
  679. function showLog()
  680. {
  681.     var logWin = window.open("", "log", "status=yes,scrollbars=yes");
  682.     var logWinRange = logWin.document.body.createTextRange();
  683.  
  684.     var oneLongLineWithBreaks = "", ndx;
  685.  
  686.     for( ndx = 0; ndx < logNdx; ndx++ ) {
  687.         oneLongLineWithBreaks += handleSpaces(logArr[ndx]);
  688.     }
  689.  
  690.     logWinRange.pasteHTML(oneLongLineWithBreaks);
  691. }
  692. //------------------------------------------------------------------
  693. function windowScroll(nextScrollString, nextScrollTime, is_right_side)
  694. {
  695.     var curPos;
  696.     var scroll = parseInt(top.frames[2].document.forms[0].whichScroll.value);
  697.     var setTimeoutStr = is_right_side ? "windowScroll('',0,1)" : "windowScroll('',0,0)";
  698.     var theFrameToBeScrolled = is_right_side ? top.frames[1] : top.frames[0];
  699.  
  700.     if( nextScrollString.length ) { // Must be first time/init
  701.         scroll_direction_down = 1;
  702.         glob_nextScrollString = nextScrollString;
  703.         glob_nextScrollTime = nextScrollTime;
  704.         clearTimeout(the_timer);
  705.         if( ! scroll ) {
  706.             the_timer = setTimeout(glob_nextScrollString,glob_nextScrollTime);
  707.         }
  708.         else {
  709.             the_timer = setTimeout(setTimeoutStr, rate); 
  710.         }
  711.         return; 
  712.     }
  713.  
  714.     if( ! scroll ) {
  715.         clearTimeout(the_timer);
  716.         the_timer = setTimeout(glob_nextScrollString,glob_nextScrollTime);
  717.         return; 
  718.     }
  719.  
  720.     if( glob_pause ) { setTimeout(setTimeoutStr, 500); return; }
  721.  
  722.     if( theFrameToBeScrolled.document.body.scrollHeight > theFrameToBeScrolled.document.body.clientHeight) {
  723.         // WINDOW IS SCROLLABLE
  724.  
  725.         if( scroll_direction_down ) {
  726.             theFrameToBeScrolled.scrollBy(0,scroll); // <<<------- SCROLL THE WINDOW
  727.             curPos = theFrameToBeScrolled.document.body.scrollTop;
  728.             if(curPos >= theFrameToBeScrolled.document.body.scrollHeight-theFrameToBeScrolled.document.body.clientHeight) {
  729.                 scroll_direction_down = 0;
  730.             }
  731.         }
  732.         else {
  733.             if( glob_upTechnique ) {    // We need to get back to the top via the 'top' link
  734.                 scroll_direction_down = 1;
  735.                 clickTheTopLink();
  736.                 clearTimeout(the_timer);
  737.                 the_timer = setTimeout(glob_nextScrollString,glob_nextScrollTime);
  738.                 return;
  739.             }
  740.             theFrameToBeScrolled.scrollBy(0,(scroll * -1)); // <<<------- SCROLL THE WINDOW
  741.             curPos = theFrameToBeScrolled.document.body.scrollTop;
  742.             if( curPos < scroll ) {
  743.                 curPos = 0;
  744.             }
  745.             if( ! curPos ) {
  746.                 scroll_direction_down = 1;
  747.                 theFrameToBeScrolled.scroll(0,0);    // <<<------- FORCE WINDOW TO TOP
  748.                 clearTimeout(the_timer);
  749.                 the_timer = setTimeout(glob_nextScrollString,glob_nextScrollTime);
  750.                 return;
  751.             }
  752.         }
  753.         the_timer = setTimeout(setTimeoutStr, 1);
  754.     }
  755.     else {
  756.         // WINDOW IS NOT SCROLLABLE
  757.         theFrameToBeScrolled.scroll(0,0); // <<<------- FORCE WINDOW TO TOP
  758.         clearTimeout(the_timer);
  759.         the_timer = setTimeout(glob_nextScrollString,glob_nextScrollTime);
  760.     }
  761. }
  762. //------------------------------------------------------------------
  763. //------------------------------------------------------------------
  764. //------------------------------------------------------------------
  765. //------------------------------------------------------------------
  766. //------------------------------------------------------------------
  767. //------------------------------------------------------------------
  768. //------------------------------------------------------------------
  769. //------------------------------------------------------------------
  770. function stp_all()
  771. {
  772.     glob_bool_step_ALL = 1; 
  773.     testChange(T_STP_UH);
  774.     stp_uh();
  775. }
  776. //------------------------------------------------------------------
  777. function stp_uh()
  778. {
  779.     announceTest(0);
  780.     announceMilestone("Clicking upon the navigation links.");
  781.  
  782.     gatherListOfNavLinks("0");
  783.  
  784.     proceedToNextFunction("stp_uh_navlinks()");
  785. }
  786. //------------------------------------------------------------------
  787. function stp_uh_navlinks()
  788. {
  789.     if( glob_pause ) { setTimeout("stp_uh_navlinks()", 1000); return; }
  790.  
  791.     if( links_to_process_NAV_ndx < links_to_process_NAV.length ) {
  792.         clickNavLink();
  793.         windowScroll("rpt('stp_uh_navlinks()',0,1)",rate,1);
  794.     }
  795.     else {
  796.         announceCompletedSubsection();
  797.         milestone("Clicking upon the PREVIOUS links.");
  798.         proceedToNextFunction("stp_uh_prevLinks()");
  799.     }
  800. }
  801. //------------------------------------------------------------------
  802. function stp_uh_nextLinks()
  803. {
  804.     if( glob_pause ) { setTimeout("stp_uh_nextLinks()", 1000); return; }
  805.  
  806.     if( top.frames[1].document.links[0].innerHTML.indexOf(top.NM_next) != -1 ) {
  807.         // This is the first 'Next' link. Click it!
  808.             glob_upTechnique = 1;    // Use 'top' link to get up
  809.             announceLinkClick(top.frames[1].document.links[0]);
  810.             top.frames[1].document.links[0].click();
  811.             windowScroll("rpt('stp_uh_nextLinks()',1,0)", rate,1);
  812.     }
  813.     else if( top.frames[1].document.links[1].innerHTML.indexOf(top.NM_next) != -1 ) {
  814.         // This is a non-first 'Next' link. Click it!
  815.             announceLinkClick(top.frames[1].document.links[1]);
  816.             top.frames[1].document.links[1].click();
  817.             windowScroll("rpt('stp_uh_nextLinks()',1,0)", rate,1);
  818.     }
  819.     else {
  820.         announceCompletedSubsection();
  821.         announceTest(1);
  822.         if(glob_bool_step_ALL) {
  823.             endTest("DONE", 0);
  824.             testChange(T_STP_CO);
  825.             proceedToNextFunction("stp_co()");
  826.         }
  827.         else {
  828.             endTest("DONE", 1 );
  829.         }
  830.     }
  831. }
  832. //------------------------------------------------------------------
  833. function stp_uh_prevLinks()
  834. {
  835.     if( glob_pause ) { setTimeout("stp_uh_prevLinks()", 1000); return; }
  836.  
  837.     if( top.frames[1].document.links[0].innerHTML.indexOf(top.NM_previous) != -1 ) {
  838.         // There is a 'Previous' link. Click it!
  839.             announceLinkClick(top.frames[1].document.links[0]);
  840.             top.frames[1].document.links[0].click();
  841.             windowScroll("rpt('stp_uh_prevLinks()',1,0)", rate,1);
  842.     }
  843.     else {
  844.         announceCompletedSubsection();
  845.         milestone("Clicking upon the NEXT links.");
  846.         proceedToNextFunction("stp_uh_nextLinks()");
  847.     }
  848. }
  849. //------------------------------------------------------------------
  850. function stp_co()
  851. {
  852.     announceTest(0);
  853.     announceMilestone("Clicking upon the 'contents' links tree.");
  854.  
  855.     gatherListOfNavLinks("1");
  856.  
  857.     proceedToNextFunction("stp_co_links(0)");
  858. }
  859. //------------------------------------------------------------------
  860. function stp_co_links(state)
  861. {
  862.     if( glob_pause ) { setTimeout("stp_co_links("+state+")", 1000); return; }
  863.  
  864.     // --------------------------------
  865.     // STATE =  = click nav-side link 
  866.     // --------------------------------
  867.     if( ! state ) {                            
  868.         if( links_to_process_NAV_ndx < links_to_process_NAV.length ) {
  869.             clickNavLink();
  870.             windowScroll("rpt('stp_co_links(1)',0,1)",rate,1);
  871.         }
  872.         else {
  873.             announceCompletedSubsection();
  874.             stp_co2();
  875.         }
  876.     }
  877.  
  878.     // -------------------------------------
  879.     // STATE = 1 = get list of level 1 links
  880.     // -------------------------------------
  881.     else if( state == 1 ) {                                            
  882.         gatherListOfLevel_1_Links();
  883.         proceedToNextFunction("stp_co_links(2)");
  884.     }
  885.  
  886.     // ------------------------------------------
  887.     // STATE = 2 = click the current level 1 link
  888.     // ------------------------------------------
  889.     else if( state == 2 ) {                                            
  890.         if( links_to_process_CH_ndx < links_to_process_CH.length ) {
  891.             clickContentLink("CH");
  892.             windowScroll("rpt('stp_co_links(4)',0,1)",rate,1);
  893.         }
  894.         else {
  895.             proceedToNextFunction("stp_co_links(0)");
  896.         }
  897.     }
  898.  
  899.     // ----------------------------------------
  900.     // STATE = 3 = hit back button in 'content'
  901.     // ----------------------------------------
  902.     else if( state == 3 ) {                                            
  903.         top.frames[1].history.go(-1);
  904.         proceedToNextFunction("stp_co_links(2)");
  905.     }
  906.  
  907.     // -------------------------------------
  908.     // STATE = 4 = get list of level 2 links
  909.     // -------------------------------------
  910.     else if( state == 4 ) {                                            
  911.         if( gatherListOfLevel_2_Links() ) {
  912.             proceedToNextFunction("stp_co_links(5)");
  913.         }
  914.         else {
  915.             proceedToNextFunction("stp_co_links(3)");
  916.         }
  917.     }
  918.  
  919.     // -----------------------------------------------
  920.     // STATE = 5 = click upon the current level 2 link
  921.     // -----------------------------------------------
  922.     else if( state == 5 ) {                                            
  923.         if( links_to_process_LVL1_ndx < links_to_process_LVL1.length ) {
  924.             clickContentLink("L1");
  925.             windowScroll("rpt('stp_co_links(7)',0,1)",rate,1);
  926.         }
  927.         else {
  928.             proceedToNextFunction("stp_co_links(6)");
  929.         }
  930.     }
  931.  
  932.     // ----------------------------------------
  933.     // STATE = 6 = hit back (from level 1)
  934.     // ----------------------------------------
  935.     else if( state == 6 ) {                                            
  936.         top.frames[1].history.go(-1);
  937.         proceedToNextFunction("stp_co_links(2)");
  938.     }
  939.  
  940.     // -----------------------------------------------
  941.     // STATE = 7 = hit back (from level 2)
  942.     // -----------------------------------------------
  943.     else if( state == 7 ) {
  944.         top.frames[1].history.go(-1);
  945.         proceedToNextFunction("stp_co_links(5)");
  946.     }
  947. }
  948. //------------------------------------------------------------------
  949. function stp_co2()
  950. {
  951.     announceMilestone("Traversing the 'contents' pages via NEXT and PREVIOUS links.");
  952.     proceedToNextFunction("stp_co2_links(0)");
  953. }
  954. //------------------------------------------------------------------
  955. function stp_co2_links(state)
  956. {
  957.     if( glob_pause ) { setTimeout("stp_co2_links("+state+")", 1000); return; }
  958.  
  959.     // -----------------------------------------
  960.     // STATE = 0 = click to the 1st content page
  961.     // -----------------------------------------
  962.     if( ! state ) {
  963.         links_to_process_NAV_ndx = 0;                        // Point to first NAV link
  964.         clickNavLink();                                        // This will get us to the 1st content page.
  965.         proceedToNextFunction("stp_co2_links(1)");
  966.     }
  967.  
  968.     // ---------------------------------------
  969.     // STATE = 1 = click the current NEXT link
  970.     // ---------------------------------------
  971.     else if( state == 1 ) {
  972.         if( clickNextLink() ) {
  973.             proceedToNextFunction("stp_co2_links(1)");
  974.         }
  975.         else {
  976.             proceedToNextFunction("stp_co2_links(2)");
  977.         }
  978.     }
  979.  
  980.     // -------------------------------------------
  981.     // STATE = 2 = click the current PREVIOUS link
  982.     // -------------------------------------------
  983.     else if( state == 2 ) {
  984.         if( clickPrevLink() ) {
  985.             proceedToNextFunction("stp_co2_links(2)");
  986.         }
  987.         else {
  988.             announceCompletedSubsection();
  989.             announceTest(1);
  990.             if(glob_bool_step_ALL) {
  991.                 endTest("DONE", 0);
  992.                 testChange(T_STP_NX);
  993.                 proceedToNextFunction("stp_nx()");
  994.             }
  995.             else {
  996.                 endTest("DONE", 1 );
  997.             }
  998.         }
  999.     }
  1000. }
  1001. //------------------------------------------------------------------
  1002. function stp_nx()
  1003. {
  1004.     announceTest(0);    //glob_bool_step_ALL = 1; glob_bool_enchilada = 1;
  1005.     announceMilestone("Clicking upon the letter links.");
  1006.  
  1007.     proceedToNextFunction("stp_nx_letterLinks()");
  1008. }
  1009. //------------------------------------------------------------------
  1010. function stp_nx_letterLinks()
  1011. {
  1012.     var thisNode, nextNode, foundIt = 0;
  1013.  
  1014.     if( glob_pause ) { setTimeout("stp_nx_letterLinks()", 1000); return; }
  1015.  
  1016.     thisNode = getLastNodeOf(""+top.frames[0].document.location);
  1017.     nextNode = getNextNxNode(thisNode);
  1018.  
  1019.     // Find the link that matches the next letter and click upon it.
  1020.         if( clickOnLinkThatMatches(nextNode) ) {
  1021.             clearTimeout(the_timer);
  1022.             windowScroll("rptLeft('stp_nx_letterLinks()',1,0)", rate,0);
  1023.         }
  1024.         else {
  1025.             proceedToNextFunction("stp_nx_letterLinksPreFinal()");
  1026.         }
  1027. }
  1028. //------------------------------------------------------------------
  1029. function stp_nx_letterLinksPreFinal()
  1030. {
  1031.     var alwaysFirstLink = "2_0_0_0.html";
  1032.  
  1033.     // Find the link that matches the "always 1st link" and click upon it.
  1034.         if( clickOnLinkThatMatches(alwaysFirstLink) ) {
  1035.             clearTimeout(the_timer);
  1036.             windowScroll("rptLeft('stp_nx_letterLinksFinal()',1,0)", rate,0);
  1037.         }
  1038. }
  1039. //------------------------------------------------------------------
  1040. function stp_nx_letterLinksFinal()
  1041. {
  1042.     rptLeft('',1,-1);
  1043.     announceCompletedSubsection();
  1044.     stp_nx_pageLinksPre();
  1045. }
  1046. //------------------------------------------------------------------
  1047. function stp_nx_pageLinksPre()
  1048. {
  1049.     announceMilestone("Clicking upon the index pages' content links.");
  1050.     
  1051.     proceedToNextFunction("stp_nx_pageLinks()");
  1052. }
  1053. //------------------------------------------------------------------
  1054. function stp_nx_pageLinks()
  1055. {
  1056.     // GATHER A LIST (ARRAY) OF THE LINKS THAT WILL BE CLICKED UPON
  1057.         links_to_process_NAV = new Array();
  1058.         links_to_process_NAV_ndx = 0;
  1059.         for( var ndx=0; ndx < top.frames[0].document.links.length; ndx++ ) {
  1060.             var lnk = "" + top.frames[0].document.links[ndx];
  1061.             if( (lnk.lastIndexOf("/1_") != -1) && (lnk.lastIndexOf("/1_0_0_0.html") == -1) ) {
  1062.                 links_to_process_NAV[links_to_process_NAV.length] = ndx;
  1063.             }
  1064.         }
  1065.  
  1066.     // PROCEED TO CLICKING THROUGH THOSE LINKS
  1067.         glob_nextFunction = "stp_nx_pageLinks_setup4nextpage";
  1068.         proceedToNextFunction("stepThroughTheLinks()");
  1069. }
  1070. //------------------------------------------------------------------
  1071. function stp_nx_pageLinks_setup4nextpage()
  1072. {
  1073.     var thisNode, nextNode, foundIt = 0;
  1074.  
  1075.     thisNode = getLastNodeOf(""+top.frames[0].document.location);
  1076.     nextNode = getNextNxNode(thisNode);
  1077.  
  1078.     // Find the link that matches the next letter and click upon it.
  1079.         if( clickOnLinkThatMatches(nextNode) ) {
  1080.             clearTimeout(the_timer);
  1081.             windowScroll("rptLeft('stp_nx_pageLinks()',1,0)", rate,1);
  1082.         }
  1083.         else {
  1084.             proceedToNextFunction("stp_nx_pageLinksPreFinal()");
  1085.         }
  1086. }
  1087. //------------------------------------------------------------------
  1088. function stp_nx_pageLinksPreFinal()
  1089. {
  1090.     var alwaysFirstLink = "2_0_0_0.html";
  1091.  
  1092.     // Find the link that matches the "always 1st link" and click upon it.
  1093.         if( clickOnLinkThatMatches(alwaysFirstLink) ) {
  1094.             clearTimeout(the_timer);
  1095.             windowScroll("rptLeft('stp_nx_pageLinksFinal()',1,0)", rate,1);
  1096.         }
  1097. }
  1098. //------------------------------------------------------------------
  1099. function stp_nx_pageLinksFinal()
  1100. {
  1101.     announceCompletedSubsection();
  1102.     announceTest(1);
  1103.     if( glob_bool_step_ALL ) {
  1104.         if( glob_bool_enchilada ) {
  1105.             endTest("DONE with STEPPER-ALL test", 0 );
  1106.             testChange(T_SEA_WORD);
  1107.             proceedToNextFunction("sea_words()");
  1108.         }
  1109.         else {
  1110.             endTest("DONE with STEPPER-ALL test", 1 );
  1111.         }
  1112.     }
  1113.     else {
  1114.         endTest("DONE", 1 );
  1115.     }
  1116. }
  1117. //------------------------------------------------------------------
  1118. function all_all()
  1119. {
  1120.     glob_bool_enchilada = 1;
  1121.     stp_all();
  1122. }
  1123. //------------------------------------------------------------------
  1124. function sea_words()
  1125. {
  1126.     announceTest(0);
  1127.     //setNavFrame();
  1128.     proceedToNextFunction("sea_words_steps(0)");
  1129. }
  1130. //------------------------------------------------------------------
  1131. function sea_words_steps(state)
  1132. {
  1133.     var currentLine = "";
  1134.     var fileSearched = "";
  1135.     var bool_found_it = 0;
  1136.  
  1137.     if( glob_pause ) { setTimeout("sea_words_steps("+state+")", 1000); return; }
  1138.  
  1139.     // ----------------
  1140.     // STATE = 0 = init
  1141.     // ----------------
  1142.     if( ! state ) {
  1143.         glob_searchword_ndx = 0;
  1144.         glob_searchword_errors = 0;
  1145.         
  1146.         //setNavFrame();
  1147.         if( top.sc1.length ) {
  1148.             // Search db has been loaded
  1149.                 rate = RATE_slow;
  1150.                 proceedToNextFunction("sea_words_steps(2)");
  1151.         }
  1152.         else {
  1153.             // Search db HAS NOT been loaded
  1154.                 proceedToNextFunction("sea_words_steps(1)");
  1155.         }
  1156.     }
  1157.  
  1158.     // -------------------------------------------
  1159.     // STATE = 1 = load the database
  1160.     // -------------------------------------------
  1161.     if( state == 1 ) {
  1162.  
  1163.         currentLine = "adobe";
  1164.             top.srch_input_verbatim = currentLine;
  1165.             searchTerm = currentLine;
  1166.             top.srch_input_massaged = currentLine;
  1167.  
  1168.         top.srch_1_shot = 1;
  1169.         top.frames[0].location = "srch_fset.html";
  1170.  
  1171.         rate = RATE_slow * 3;
  1172.         proceedToNextFunction("sea_words_steps(2)");
  1173.     }
  1174.  
  1175.     // -------------------------------------------
  1176.     // STATE = 2 = search for the current word/file/line
  1177.     // -------------------------------------------
  1178.     if( state == 2 ) {
  1179.         rate = RATE_slow * 2;
  1180.         top.frames[0].location = "search.html";
  1181.         currentLine = top.sc2[glob_searchword_ndx];
  1182.         fileSearched = top.fileArr[glob_searchword_ndx] + ".html";
  1183.  
  1184.         // Set the maxlength of the input textfield to the length of the current line
  1185.             top.frames[0].search.input.maxLength = currentLine.length;
  1186.         // Enter the current stopword into the input textfield
  1187.             top.frames[0].document.forms["search"].input.value = currentLine;
  1188.         // Click upon the 'Search' button
  1189.             top.frames[0].document.forms["search"].doSearch.click();
  1190.  
  1191.         item(1,"Searching for file contents: " + fileSearched );
  1192.         proceedToNextFunction("sea_words_steps(3)");
  1193.     }
  1194.  
  1195.     // -------------------------------------------
  1196.     // STATE = 3 = report search results
  1197.     // -------------------------------------------
  1198.     if( state == 3 ) {
  1199.  
  1200.         if( top.frames[0].document.links.length <= 4 ) { // checking for any besides UH, CO, NX, SM
  1201.             item(2,"ERROR: No search hits were found!");
  1202.             glob_searchword_errors++;
  1203.         }
  1204.         else {
  1205.             bool_found_it = 0;
  1206.             currentLine = top.sc2[glob_searchword_ndx];
  1207.             fileSearched = top.fileArr[glob_searchword_ndx] + ".html";
  1208.  
  1209.             for( var ndx = 0; ndx < top.frames[0].document.links.length; ndx++ ) {
  1210.                 var lnk = "" + top.frames[0].document.links[ndx];
  1211.                 var href = "" + top.frames[0].document.links[ndx].href;
  1212.                 href = href.substring(href.lastIndexOf("/")+1,href.length);
  1213.  
  1214.                 if( lnk.indexOf(fileSearched) != -1 ) {
  1215.                     bool_found_it = 1;
  1216.                     item(2,"FOUND link to: " + href);
  1217.                 }
  1218.             }    // end of 'for' loop
  1219.             if( ! bool_found_it ) {
  1220.                 item(2,"ERROR: This file's contents were NOT FOUND!");
  1221.                 glob_searchword_errors++;
  1222.                 proceedToNextFunction("sea_words_steps(4)");
  1223.             }
  1224.             glob_searchword_ndx++;
  1225.             if( glob_searchword_ndx >= top.sc2.length ) {
  1226.                 // DONE
  1227.                     proceedToNextFunction("sea_words_steps(4)");
  1228.             }
  1229.             else {
  1230.                 // NOT DONE
  1231.                     proceedToNextFunction("sea_words_steps(2)");
  1232.             }
  1233.         }
  1234.     }
  1235.  
  1236.     // -------------------------------------------
  1237.     // STATE = 4 = DONE = wrap it up!
  1238.     // -------------------------------------------
  1239.     if( state == 4 ) {
  1240.         if( ! glob_searchword_errors ) {
  1241.             announceTest(1);
  1242.         }
  1243.         else {
  1244.             announceTest( -1 * glob_searchword_errors );
  1245.         }
  1246.         if( glob_bool_enchilada ) {
  1247.             endTest("DONE with SEARCH-words test", 0 );
  1248.             if( top.isDblByte ) {
  1249.                 endTest("DONE with THE WHOLE ENCHILADA test", 1 );
  1250.             }
  1251.             else {
  1252.                 testChange(T_SEA_STOP);
  1253.                 sea_stop();
  1254.             }
  1255.         }
  1256.         else {
  1257.             endTest("DONE",1);
  1258.         }
  1259.     }
  1260. }
  1261. //------------------------------------------------------------------
  1262. function sea_stop()
  1263. {
  1264.     announceTest(0);
  1265.     proceedToNextFunction("sea_stop_steps(0)");
  1266. }
  1267. //------------------------------------------------------------------
  1268. function sea_stop_steps(state)
  1269. {
  1270.     var current_sw;
  1271.  
  1272.     if( glob_pause ) { setTimeout("sea_stop_steps("+state+")", 1000); return; }
  1273.  
  1274.     // ----------------
  1275.     // STATE = 0 = init
  1276.     // ----------------
  1277.     if( ! state ) {
  1278.         glob_searchword_ndx = 0;
  1279.         glob_searchword_errors = 0;
  1280.         rate = RATE_slow * 3;
  1281.         setNavFrame();
  1282.         proceedToNextFunction("sea_stop_steps(1)");
  1283.     }
  1284.  
  1285.     // -------------------------------------------
  1286.     // STATE = 1 = search for the 1st stopword
  1287.     // -------------------------------------------
  1288.     if( state == 1 ) {
  1289.  
  1290.         current_sw = getAndSetStopword4Search();
  1291.  
  1292.         top.srch_1_shot = 1;
  1293.             
  1294.         item(1,"Searching for stopword: " + current_sw );
  1295.         top.frames[0].location = "srch_fset.html";
  1296.  
  1297.         proceedToNextFunction("sea_stop_steps(2)");
  1298.     }
  1299.  
  1300.     // -------------------------------------------
  1301.     // STATE = 2 = report search results
  1302.     // -------------------------------------------
  1303.     if( state == 2 ) {
  1304.         if( top.frames[0].document.links.length > 4 ) { // checking for any besides UH, CO, NX, SM
  1305.             item(2,"ERROR: This stopword yielded search hits!");
  1306.             glob_searchword_errors++;
  1307.         }
  1308.         else {
  1309.             item(2, "OK: no search hits were found" );
  1310.         }
  1311.         if( glob_searchword_ndx >= top.stopwords.length ) {
  1312.             // We are done. We have processed all of the stopwords.
  1313.             proceedToNextFunction("sea_stop_steps(4)");
  1314.         }
  1315.         else {
  1316.             // We are not yet done.
  1317.             rate = RATE_slow;
  1318.             proceedToNextFunction("sea_stop_steps(3)");
  1319.         }
  1320.     }
  1321.  
  1322.     // -------------------------------------------
  1323.     // STATE = 3 = search for non-1st stopword
  1324.     // -------------------------------------------
  1325.     if( state == 3 ) {
  1326.         current_sw = top.stopwords[glob_searchword_ndx++];
  1327.  
  1328.         // Enter the current stopword into the input textfield
  1329.             top.frames[0].document.forms["search"].input.value = current_sw;
  1330.         // Click upon the 'Search' button
  1331.             top.frames[0].document.forms["search"].doSearch.click();
  1332.  
  1333.         item(1,"Searching for stopword: " + current_sw );
  1334.  
  1335.         proceedToNextFunction("sea_stop_steps(2)");
  1336.     }
  1337.  
  1338.     // -------------------------------------------
  1339.     // STATE = 4 = DONE = wrap it up!
  1340.     // -------------------------------------------
  1341.     if( state == 4 ) {
  1342.         if( ! glob_searchword_errors ) {
  1343.             announceTest(1);
  1344.         }
  1345.         else {
  1346.             announceTest( -1 * glob_searchword_errors );
  1347.         }
  1348.  
  1349.         if( glob_bool_enchilada ) {
  1350.             endTest("DONE with THE WHOLE ENCHILADA test", 1 );
  1351.         }
  1352.         else {
  1353.             endTest("DONE",1);
  1354.         }
  1355.     }
  1356. }
  1357. //------------------------------------------------------------------
  1358. //-->
  1359. </SCRIPT>
  1360. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  1361. </head>
  1362. <BODY BGCOLOR="#FFFFFF">
  1363.  
  1364. <TABLE width="100%">
  1365. <TR>
  1366.     <TD valign="top">
  1367.         <FORM NAME="the_controls" METHOD=POST ACTION="">
  1368.             <SELECT NAME="whichTest" onChange="testChange(this.selectedIndex);">
  1369.                 <OPTION VALUE="ALL_ALL">Run ALL Tests (The whole enchilada)
  1370.                 <OPTION VALUE="PAGE_STEPPER_UH" selected>Page Stepper - UH
  1371.                 <OPTION VALUE="PAGE_STEPPER_CO">Page Stepper - CO
  1372.                 <OPTION VALUE="PAGE_STEPPER_NX">Page Stepper - NX
  1373.                 <OPTION VALUE="PAGE_STEPPER_ALL">Page Stepper - ALL
  1374.                 <OPTION VALUE="SEARCH_TESTER_WORD">Search Tester - Search Words
  1375.                 <OPTION VALUE="SEARCH_TESTER_STOP">Search Tester - Stop Words
  1376.             </SELECT>
  1377.  
  1378.             <SELECT NAME="whichScroll" onChange="scrollChange(this.selectedIndex);">
  1379.                 <OPTION VALUE="0" selected>No scrolling
  1380.                 <OPTION VALUE="2">Slow scrolling
  1381.                 <OPTION VALUE="5">Medium scrolling
  1382.                 <OPTION VALUE="8">Fast scrolling
  1383.             </SELECT>
  1384.  
  1385.             <INPUT TYPE="button" ID="pause" VALUE="pause" onClick="pauseResumeTest();" disabled> 
  1386.             <INPUT TYPE="button" ID="start" VALUE="start" onClick="startStopTest();"> 
  1387.             <INPUT TYPE="button" ID="eraseLog" VALUE="erase log" onClick="eraseTheLog();">
  1388.             <INPUT TYPE="button" ID="windowizeLog" VALUE="display log" onClick="showLog();">
  1389.         </FORM>    
  1390.     </TD>
  1391. </TR>
  1392. <TR>
  1393.     <TD valign="top">
  1394.         <FORM NAME="logForm" METHOD=POST ACTION="">
  1395.             Current Log Line:<br>
  1396.             <INPUT TYPE="text" NAME="log" size="60" maxlength="60">
  1397.         </FORM>
  1398.     </TD>
  1399. </TR>
  1400. </TABLE>
  1401.  
  1402. </BODY>
  1403. </html>